Skip to main content

Fourier Series

In this note, we will explore Fourier series, a way to represent periodic functions as a sum of sines and cosines.

Table of Contents

Introduction

Suppose you have any function . For the sake of simplicity, let's assume that is periodic with period . This could, for example, be the trajectory of a pendulum, or the voltage across a resistor in an AC circuit.

Now imagine that you want to represent this function as a sum of sines and cosines. Each time you add a sine or cosine, you can adjust its amplitude and phase to make it fit the function better. When the sum of sines and cosines is infinite, it will perfectly fit the function, similar to a Taylor series.

Each term in this series must also be periodic with periods that are integer multiples of the period of the function, i.e. . If the period is just , then the sine/cosine term looks like or . The next terms will have periods of , , and so on. As such, the terms in the series are and .

With this, we can write the Fourier series of as:

It is often much more convenient to use complex exponentials instead of sines and cosines, since they are easier to work with. The Fourier series can then be written as:

The coefficients correspond to the coefficients and in the Fourier series. We can introduce another term , which is the angular frequency of the term.

(Recall from introductory physics that for a simple harmonic oscillator, the function is . This is just the complex exponential form of that function.)

Since complex exponentials are visualized as circles in the complex plane, one could imagine that each term in the Fourier series is a circle with a certain radius and frequency. The sum of all these circles will then trace out the function .

Fourier Coefficients

Now that we have established the foundations of the Fourier series, we still need to determine the coefficients .

First, let's try to determine the coefficient , corresponding to . This is defined as the term with a frequency of zero, meaning that it is just a constant term:

We can find this by realizing that if we take a sample of points of the function and average them, we will get the constant term. In this way, the constant term is the "center of mass" of the function in the complex plane:

To see this more concretely, consider what the integral actually does to :

Because every other term has a frequency that is not zero, the integral of those terms will be zero. Visually, imagine that term being a circle in the complex plane. Obviously, the average of all the points on the circle will be zero. However, in the special case of the constant term, because the value does not move around the circle, the average will be the value itself. As such, the integral becomes:

To find any coefficient , we can apply a similar logic. This method of finding the coefficients relies on the term being constant, but obviously that is only the case for . How do we make another term constant? The clever trick is to multiply both sides of the equation by .

Notice that specifically the term have the exponential terms cancel out:

Then, when we integrate, every term except for the term will be zero:

This method can be applied to any term in the Fourier series, and it is a very powerful tool for finding the coefficients:

Example: Laplace's Equation

This example comes from Example 3.3 in Griffiths' Introduction to Electrodynamics (4th ed.). I will not go through the details of the physical problem, but it is still worth mentioning for its mathematical content.

Gauss's law in electrostatics states that the divergence of the electric field is equal to the charge density:

This means that in a vacuum, where there is no charge, the electric field is divergenceless. If we replace with the gradient of a scalar field , we get Laplace's equation:

In Cartesian coordinates, the Laplacian is simply the sum of the second derivatives:

In our problem, is not relevant, so we can simplify the equation to:

Our boundary conditions are as follows:

  1. when .
  2. when .
  3. when .
  4. as .

In order to solve this equation, we can use the method of separation of variables. In this method, we look for solutions of the form . The partial derivatives of can then be written as:

Plugging these into Laplace's equation and dividing by gives:

The key is that these three terms are all independent of each other. They are all equal to a constant—if not, then you can, for example, change to make different and the equation will not hold. This means that each term must be equal to a constant, which we will call :

These are simply equations for simple harmonic oscillators, and the solutions are then:

where uses exponentials because is positive, and uses sines and cosines because is negative.

The potential is then the product of these two functions. Plugging in the boundary conditions, we assert that this is the form of :

Plugging in the second boundary condition gives , which means that . This means that , and the potential becomes:

Now the key is that Laplace's equation is linear, meaning that the sum of two solutions is also a solution. This means that the general solution is a sum of all these terms:

Finally, the third boundary condition must be satisfied, which means:

This is exactly what we have been talking about with Fourier series. Like before, we can find the coefficients by multiplying both sides by something to make one specific term constant. In this case, we multiply by (instead of its exponential counterpart) and integrate over . First, we multiply both sides by :

And then we integrate over :

By the same logic as with the exponentials, the integral will be zero unless . It is instructive to see the graph of to understand why this is the case:

Notice that in the case when , there is an equal amount of positive and negative area, meaning that the integral will be zero. But when , the function is always positive, meaning that the integral will be nonzero.

Non-Periodic Functions

Now that we have established the Fourier series for periodic functions, what about non-periodic functions?

First, we need to realize what a function being periodic actually entails for the Fourier series. Recall that we restricted the terms in the Fourier series to have periods that are integer multiples of the period of the function. This means that the function must be periodic with a period of a multiple of , and the Fourier series will have terms with the angular frequencies .

If the function is not periodic, we can imagine that tends to infinity. The gap between the frequencies of the terms in the Fourier series is originally . If tends to infinity, the gap between the frequencies will tend to zero.

This means that the Fourier series will have terms with frequencies that are infinitesimally close to each other. To see what this means, consider the Fourier series of a periodic function:

We will rewrite as , where the inclusion of the coefficient will be explained later. This allows us to write the Fourier series as:

Because the gap in the frequency is , we can rewrite this as:

As we said, the gap between the frequencies will tend to zero. This means that we can replace the sum with an integral, where . This gives us:

The value for is the same as before:

However, because , the integral will be over all time. Doing this and rearranging gives:

Putting this all together, we have a suggestive relation between and :

The transformation between and is known as the Fourier transform. It is usually denoted as :

Orthogonality of Complex Exponentials

The Fourier series and Fourier transform are based on the orthogonality of complex exponentials. In a certain respect, we can treat complex exponentials as a "basis", similar to how we treat the unit vectors , , and as a basis in three-dimensional space. These basis functions are orthogonal to each other, meaning that the integral of the product of two different basis functions is zero:

where is the Dirac delta function. This means that the complex exponentials are orthogonal to each other, and the Fourier transform can be thought of as a change of basis from the time basis to the frequency basis.

Another property we leverage is the completeness of the complex exponentials. This means that any function can be written as a sum of complex exponentials. This is similar to the concept of span in linear algebra. To use the language of linear algebra, we say that . This set of functions is more formally known as , the set of square-integrable functions on the real line. (A square-integrable function is one for which the integral of the square of the function is finite.)

Applying to Position and Momentum Wavefunctions

Now we will apply the Fourier transform to the position and momentum wavefunctions of a particle. The position wavefunction is a function of position, and the momentum wavefunction is a function of momentum.

If you have read the notes on the momentum operator, you will know that applying it to a position wavefunction gives:

Suppose we expand as a continuous sum of plane waves, i.e. a Fourier series. An individual term in this series goes as . The momentum operator acting on this term gives:

Notice that the momentum operator acting on a plane wave gives the same plane wave back, but with a factor of . As such, the position wavefunction term is an eigenfunction of the momentum operator, with eigenvalue .

In the continuous sum, the position wavefunction can be written as:

Because is an eigenfunction of the momentum operator, this integral resembles a spectral decomposition of the position wavefunction in terms of momentum eigenfunctions:

This means that the momentum wavefunction can be regarded the Fourier transform of the position wavefunction . We define because that is the eigenvalue of the momentum operator acting on the plane wave. Then, . With this we get:

and

There is a question mark because there is one small detail that we have not yet addressed. Consider the probability amplitude of a momentum eigenstate as given by the Born rule:

We want to ensure that the probability is conserved when we transform between the position and momentum wavefunctions. This means that the normalization of the wavefunctions must be preserved, meaning:

Currently, the normalization of the wavefunctions is not preserved. To fix this, we introduce a factor of in the Fourier transform:

Then the probability is conserved:

This is a very powerful result, as it allows us to transform between the position and momentum wavefunctions of a particle.

Note that had the position wavefunction been periodic, the range of the integral would have been limited to a certain discrete set of momenta. In other words, the momentum would have been quantized. In the case of a non-periodic position wavefunction, the momentum is continuous.

Now realize that angles are periodic with a period of . This means that the Fourier series of the angle wavefunction will have terms with a discrete set of frequencies. This is a reason why angular momentum is quantized.

Example: Square Wave

As an example, consider the square wave function:

Summary

In this note, we explored Fourier series and the Fourier transform.

Here are the key points to remember:

  • A Fourier series is a way to represent periodic functions as a sum of sines and cosines.

  • The Fourier series can be written in terms of complex exponentials, which are easier to work with.

  • The coefficients of the Fourier series can be found by integrating the function multiplied by a complex exponential.

  • For non-periodic functions, the Fourier series becomes an integral, which is known as the Fourier transform:

  • The Fourier transform leverages the orthogonality and completeness of complex exponentials.

  • The Fourier transform allows us to transform between the position and momentum wavefunctions of a particle:

This is a very powerful tool in quantum mechanics, as it allows us to transform between different representations of a particle's wavefunction.

Further Reading

Because the Fourier transform is such a fundamental concept in physics, there are many resources available to learn more about it.

Here are some resources that you might find helpful: